{:W('Template/top')}
<div class="wrapper clearfix content" style="border: 1px solid #ddd">
    {:W('Template/left')}
    <div class="rightbox pull-right">
        <div class="ur-here">您当前的位置：<a href="#">财务管理</a>&gt;交易明细</div>
        <div class="cTitle2">
            交易明细
        </div>

        <in name="Think.session.role_id" value="$operatorData">
            <input type="hidden" id="status" value="{$type}">
            <input type="hidden" class="operatorId" value="{$oid}">

            <div class="status" style="margin-bottom: -10px;">
                <label>&nbsp;&nbsp;&nbsp;&nbsp;类型：</label>
                <a class="nav-audit-state nav-audit-state0 nav-audit-statet1"
                   href="{:U('OperatorFinance/details', array('id' => I('get.id'), 'oid' => I('get.oid'), 'type' => 't1'))}"
                   style="margin-left:5px;">收支明细
                </a>

                <a class="nav-audit-state nav-audit-statet2"
                   href="{:U('OperatorFinance/details', array('id' => I('get.id'), 'oid' => I('get.oid'), 'type' => 't2'))}">分润明细
                </a>
            </div>

            <div class="status">
                <label>运营商：</label>
                <a class="nav-operator-state nav-operator-state0"
                   href="{:U('OperatorFinance/details', array('id' => I('get.id'), 'oid' => 0, 'type' => I('get.type')))}"
                   style="margin-left:5px;">全部
                </a>
                <foreach name="operatorList" item="vo">
                    <a class="nav-operator-state nav-operator-state{$vo.id}"
                       href="{:U('OperatorFinance/details', array('id' => I('get.id'), 'oid' => $vo['id'], 'type' => I('get.type')))}">{$vo.display_name}
                    </a>
                </foreach>
            </div>
        </in>

        <empty name="info">
            <table class="cTable" width="100%">
                <tr>
                    <th>{$msg}</th>
                </tr>
            </table>
        </empty>

        <notempty name="info">
            <div class="main-search">
                <div class="top">
                    <form method="get"
                          action="{:U('OperatorFinance/details',array('id' => I('get.id'), 'oid' => I('get.oid'), 'type' => I('get.type')))}"
                          class="form-inline">
                        <div class="form-group">
                            <input type="text" name="entity_name" class="form-control" placeholder="请输入交易说明">
                        </div>
                        <div class="form-group ml">
                            <label>时间：</label>
                            <input type="text" class="form-control ui-datepicker Wdate" name="start_time"
                                   value="{$startTime}" id="d4322"
                                   onclick="WdatePicker({el: $dp.$('d12')})" style="width:80%">
                        </div>
                        <span class="end">到</span>

                        <div class="form-group">
                            <label class="sr-only"></label>
                            <input type="text" class="form-control ui-datepicker Wdate" name="end_time"
                                   value="{$endTime}" id="d4322"
                                   onclick="WdatePicker({el: $dp.$('d12')})">
                        </div>
                        <button type="submit" class="btn btn-warning">查询</button>
                    </form>
                </div>

                <form method="post"
                      action="{:U('GetApplyExcel/getOperatorFinanceExcel',array('id' => I('get.id'), 'oid' => I('get.oid'), 'type' => I('get.type')))}">
                    <input type="hidden" name="sname" value="{$name}">
                    <input type="hidden" name="start_time" value="{$startTime}">
                    <input type="hidden" name="end_time" value="{$endTime}">
                    <input type="submit" class="btn btn-success" value="导出生成Excel">
                </form>
            </div>
            <table class="cTable table-hover" width="100%">

                <tr>
                    <th width="5%">编号</th>
                    <th width="8%">运营商</th>
                    <th width="8%">订单号</th>
                    <th width="10%">流水号</th>
                    <th width="20%">交易说明</th>
                    <th width="10%">收入金额</th>
                    <if condition="I('get.type') eq 't2'">
                        <th width="10%">分润比例</th>
                    </if>
                    <th width="10%">账户余额</th>
                    <th width="10%">入账时间</th>
                </tr>

                <volist name="info" id="vo">
                    <tr>
                        <td>{$vo.id}</td>
                        <td>{$vo.operator_id|getOperatorName}</td>
                        <td>{$vo.object_id}</td>
                        <td>{$vo.sn}</td>
                        <td>{$vo.action}</td>
                        <td id="money-right">
                            ￥{$vo.amount|GetYuan}
                        </td>
                        <if condition="I('get.type') eq 't2'">
                            <td>{$vo['profit_rate']/10000}%</td>
                        </if>
                        <td>￥{$vo.balance|GetYuan}</td>
                        <td>{$vo.create_time}</td>
                    </tr>
                </volist>
            </table>
        </notempty>
        <notempty name="info">
            <div class="pagebox">
                {$page}
            </div>
        </notempty>
    </div>
</div>
{:W('Template/bottom')}
</body>
</html>
